# -*- coding: utf-8 -*-
from sqlalchemy import Column, BIGINT, String, Float
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()

class CustomerInformation(Base):
    __tablename__ = 'customer_information'

    id = Column(BIGINT, primary_key=True, autoincrement=True)
    name = Column(String(50), nullable=False)
    phone_number = Column(String(15), nullable=False, unique=True)
    city = Column(String(50))
    rating = Column(Float, default=0.0)

    def __repr__(self):
        return f"<CustomerInformation(id={self.id}, name={self.name}, phone_number={self.phone_number}, city={self.city}, rating={self.rating})>"